package cn.bdqn.auth_consumer.service;

import cn.bdqn.vo.TokenVo;
import cn.bdqn.vo.UsersVo;

/**
 * 2018/9/20
 */
public interface UserService {
    /**
     * 用户登录
     * @param phone
     * @param password
     * @return
     * @throws Exception
     */
    public String login(String phone,String password)throws Exception;


    /**
     * 发送短信
     * @param phone
     * @throws Exception
     */
    public void sendRegisterEmail(String phone)throws Exception;




    /**
     * 用户是否存在
     * @param phone
     * @return
     * @throws Exception
     */
    boolean userExist(String phone)throws Exception;





    /**
     * 置换token
     * @param token
     * @return
     * @throws Exception
     */
    TokenVo reToken(String token)throws Exception;




    /**
     * 用户登出
     * @param token
     * @throws Exception
     */
    void logOut(String token)throws Exception;




    /**
     * 手机用户激活
     * @param userCode
     * @param value
     * @return
     * @throws Exception
     */
    boolean phoneActivate(String userCode, String value, UsersVo usersVo)throws Exception;
}
